#include<bits/stdc++.h>

using namespace std;
const int maxn = 100 + 20;
int a[maxn];
int dp[maxn];//dp[i]��¼����a[i]��β��������еĳ��� 
//dp[i] ״̬ת�Ʒ���  a[i]!=a[i-1] ||i==0  dp[1]  else dp[i]=dp[i-1]+1;
int n;

int main() {
    freopen("C.in", "r", stdin);
    freopen("C.out", "w", stdout);
    cin >> n;
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    dp[0] = 1;
    for (int i = 1; i < n; i++) {
        if (a[i] != a[i - 1]) dp[i] = 1;
        else dp[i] = dp[i - 1] + 1;
    }
    sort(dp, dp + n);//nlog(n)
    cout << dp[n - 1] << endl;
}

